package com.lanbu.system.domain.mongo;

import io.lettuce.core.Limit;
import lombok.Data;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Document(collection = "outlinks")
@Data
public class MongoOutlinks {
    private ObjectId _id;
    private String shareId;
    private ObjectId teamId;
    private ObjectId tmbId;

    private String type;

    private ObjectId appId;
    private String name;

    private int usagePoints;  // 新增字段，映射插入数据中的 usagePoints
    private Limit limit;      // 新增字段，映射插入数据中的 limit
    @Field("responseDetail")
    private boolean responseDetail;
    @Field("showNodeStatus")
    private boolean showNodeStatus;
    @Field("showRawSource")
    private boolean showRawSource;

    @Field("__v")
    private int version;




    private Date lastTime;

    @Data
    public static class Limit {
        private int maxUsagePoints;
        private int QPM;
    }


}
